<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ad_ManageTopHospitals.aspx.cs" Inherits="Admin_Ad_ManagetophospitalHospitals" %>

<%@ Register Src="Include/Ad_footer.ascx" TagName="Ad_footer" TagPrefix="uc3" %>
<%@ Register Src="Include/Ad_left.ascx" TagName="Ad_left" TagPrefix="uc2" %>
<%@ Register Src="Include/Ad_header.ascx" TagName="Ad_header" TagPrefix="uc1" %>

<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
    <title>Manage Hospitals</title>

    <link href="include\styles.css" rel="stylesheet" />
    <script>
        function ChangeHeaderAsNeeded(chkBox) {

            if (CheckBoxIDs != null) {
                for (var i = 0; i < CheckBoxIDs.length; i++) {
                    var cb = document.getElementById(CheckBoxIDs[i]);
                    if (!cb.checked) {
                        ChangeCheckBoxState(CheckBoxIDs[0], false);
                        return;
                    }
                }
                ChangeCheckBoxState(CheckBoxIDs[0], true);
            }
        }
        function ChangeCheckBoxState(id, checkState) {
            var cb = document.getElementById(id);
            if (cb != null)
                cb.checked = checkState;
        }

        function ChangeAllCheckBoxStates(checkState) {
            if (CheckBoxIDs != null) {
                for (var i = 0; i < CheckBoxIDs.length; i++)
                    ChangeCheckBoxState(CheckBoxIDs[i], checkState);
            }
        }

        function Confirm() {
            var Resp = confirm("Are You Sure to Update International Top Hostital Record(s)?");
            if (Resp == true) {
                return true;
            }
            else {
                return false;
            }
        }

    </script>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="butSerach" style="font-size: 12px !important;font-family: Arial, Helvetica, sans-serif !important;">
        <div>

            <table width="100%" border="0" cellspacing="0" cellpadding="0">

                <!-- Masthead starts from here-->

                <uc1:Ad_header ID="Ad_header1" runat="server" />

                <!-- Masthead ends here-->

                <tr>
                    <td></td>
                    <td>
                        <table width="716" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="150" valign="top">

                                    <!-- Left panel starts from here-->

                                    <uc2:Ad_left ID="Ad_left1" runat="server" />

                                    <!-- Left panel ends from here-->
                                </td>
                                <td width="15" valign="top">
                                    <img src="../images/spacer.gif" width="15" height="1" /></td>
                                <td width="551" valign="top">

                                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tblborder">
                                        <tr>
                                            <td width="2%" height="35"></td>
                                            <td width="96%" class="normalblack_12" align="center"><b>Manage Top Hospitals</b></td>
                                            <td width="2%"></td>
                                        </tr>
                                        <tr>
                                            <td height="35" width="2%"></td>
                                            <td align="right" class="normalblack_12" width="96%">
                                                <asp:Label ID="lblDocs" runat="server" Text="Total International Hospitals:"></asp:Label><asp:Label
                                                    ID="lbltotHosp" runat="server"></asp:Label></td>
                                            <td width="2%"></td>
                                        </tr>
                                        <tr>
                                            <td style="height: 43px"></td>
                                            <td style="height: 43px; width: 526px;" colspan="2">
                                                <strong class="normalgrey_12">Hospital Name</strong>:<asp:TextBox ID="txtName" runat="server" Width="337px"></asp:TextBox>
                                                <asp:Button ID="butSerach" runat="server" Text="Go" OnClick="butSerach_Click" />
                                            </td>
                                        </tr>
                                        <tr style="font-family: Times New Roman">
                                            <td height="200"></td>
                                            <td valign="top" class="normalblack_12" align="center">
                                                <asp:Label ID="lblMsg" runat="server" Text=""></asp:Label><br>
                                                <asp:GridView DataKeyNames="Id" ID="grdmedsch" runat="server" AutoGenerateColumns="False" ShowFooter="True"
                                                    CssClass="normalgrey_12" Width="95%" AllowPaging="True" OnPageIndexChanging="grdmedsch_PageIndexChanging"
                                                    OnRowDataBound="grdmedsch_RowDataBound" OnRowCommand="grdmedsch_RowCommand">
                                                    <Columns>

                                                        <asp:TemplateField HeaderText="Edit">
                                                            <ItemTemplate>
                                                                <a href="Ad_AddHospital.aspx?from=top&id=<%# Eval("ID") %>" title="Edit Record">
                                                                    <img src="../images/editinfo.gif" border="0" /></a>
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:HyperLink ID="hypInsert" runat="server" NavigateUrl="Ad_AddHospital.aspx" ImageUrl="../images/new-imga.gif" ToolTip="Insert New Record" />
                                                            </FooterTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="Hospital Name" DataField="Hospital_Name" />
                                                        <asp:BoundField HeaderText="Overall Rating" DataField="Country" />

                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                <asp:CheckBox ID="HeaderLevelCheckBox" runat="server" />
                                                            </HeaderTemplate>
                                                            <FooterTemplate>
                                                                <asp:Button ID="buttophospital" runat="server" CommandName="tophospital" Text="Mark Top Hospital" OnClientClick="return Confirm();" />
                                                            </FooterTemplate>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="RowLevelCheckBox" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"ID")%>' />
                                                            </ItemTemplate>
                                                            <FooterStyle HorizontalAlign="Center" />
                                                        </asp:TemplateField>

                                                    </Columns>
                                                    <RowStyle HorizontalAlign="Left" />
                                                    <PagerStyle HorizontalAlign="Center" />
                                                    <FooterStyle HorizontalAlign="Left" />

                                                </asp:GridView>

                                            </td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td height="20"></td>
                                            <td></td>
                                            <td></td>
                                        </tr>
                                        <tr><td height="20"></td>
                                            <td style="font-weight: bold; text-decoration: underline" colspan="2">Final Result Preview<br /><br /></td>
                                        </tr>
                                        <tr><td height="20"></td>
                                            <td colspan="2">
                                                <label for="Service_Name" id="lbl" style="width: 300px;font-weight:bold">Top International Hospitals & Practices<br /><br /></label>
                                                <table width="480" cellspacing="0" cellpadding="5" style="background-color: #FF6C00; padding: 5px; border-radius: 10px;">
                                                    <tbody>
                                                        <asp:Repeater ID="tophospital_Hospital_Repeater" runat="server">

                                                            <ItemTemplate>
                                                                <tr>
                                                                    <td style="padding-left: 0px; font-weight: bold; color: #FFF"><a href="<%=Session["strHttp"]%>hospital.aspx?t=int&id=<%# Eval("ID")%>" style="color: #FFF"><%# Eval("Hospital_Name")%></a></td>
                                                                    <td style="font-weight: bold; color: #FFF"><%# Eval("Country")%></td>
                                                                    <td style="font-weight: bold; color: #FFF"><a href="Ad_AddHospital.aspx?from=top&id=<%# Eval("ID") %>" title="Edit Record">
                                                                    <img src="../images/editinfo.gif" border="0" /></a><asp:ImageButton ID="btndetele" CommandName="Remove" 
                                                                        CommandArgument='<%# Eval("ID") %>' runat="server" OnClick="btndetele_Click" 
                                                                        ImageUrl="~/Images/delete.gif" 
                                                                         ToolTip="Remove This Hospital From tophospital List" border="0" /></td>
                                                                </tr>

                                                            </ItemTemplate>

                                                        </asp:Repeater>

                                                    </tbody>
                                                </table>
                                            </td>
                                        </tr>
                                         <tr>
                                            <td height="20"></td>
                                            <td></td>
                                            <td></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td height="30" colspan="3"></td>
                </tr>
                <tr>
                    <td height="1" bgcolor="#CCCCCC">
                        <img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
                    <td bgcolor="#CCCCCC">
                        <img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
                    <td bgcolor="#CCCCCC">
                        <img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
                </tr>
                <tr>
                    <td height="20" colspan="3"></td>
                </tr>

                <!-- Bottom starts from here-->

                <uc3:Ad_footer ID="Ad_footer1" runat="server" />

                <!-- Bottom ends here-->

            </table>


        </div>
    </form>
</body>
</html>

